package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * 问诊订单支付状态
 */
@EnumDescription("问诊订单支付状态")
public enum InquiryOrderPaymentStateEnum implements DictEnum {

	//--------------------start-----------------

	/**
	 * 待支付
	 */
	TO_BE_PAID("01","待支付"),

	/**
	 * 已支付
	 */
	HAVE_TO_PAY("02","已支付"),

	/**
	 * 退费申请中
	 */
	REFUND_APPLYING("03","退费申请中"),

	/**
	 * 已退费
	 */
	REFUND_OVER("04","已退费"),

	/**
	 * 订单异常
	 */
	ERROR("05","订单异常"),

	/**
	 * 全科订单
	 */
	FREE("06","全科订单"),
	//--------------------end-------------------
	;

	private String key;

	private String value;

	InquiryOrderPaymentStateEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}


	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(InquiryOrderPaymentStateEnum.class, value);
		}
	}
}
